#include <iostream>
#include <string>

#include "log.h"
#include "rtmp/rtmpserver.h"
#include "app.h"

int main() {
    Log("Run RTMPServer...\n");

    RTMPServer s;
    auto ret = s.Init(10002);
    if( ret != 1) {
        Log("server init error, ret=%d\n", ret);
        return -1;
    }

    App app;
    std::wstring appName(L"test");

    s.AddApplication(appName.c_str(), &app);
    

    std::cout<<"输入任意键退出"<<std::endl;
    int d;
    std::cin >> d;

    s.End();

    return 0;
}

